package com.qinglei.recoup.system.service.impl;

import com.qinglei.recoup.common.exception.RedisConnectException;
import com.qinglei.recoup.common.service.RedisService;
import com.qinglei.recoup.common.utils.JsonUtils;
import com.qinglei.recoup.system.domain.HealthBigData;
import com.qinglei.recoup.system.dao.HealthBigDataMapper;
import com.qinglei.recoup.system.domain.VitalSignsAlarm;
import com.qinglei.recoup.system.service.HealthBigDataService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author dqh
 */
@Service
public class HealthBigDataServiceImpl extends ServiceImpl<HealthBigDataMapper, HealthBigData> implements HealthBigDataService {

    @Resource
    private RedisService redisService;

    public HealthBigData getHealthBigData(String key) throws RedisConnectException {
        String s = redisService.get(key);
        HealthBigData healthBigData = JsonUtils.jsonToBean(s, HealthBigData.class);
        return healthBigData;
    }
}
